﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ZHTJ.aspx.cs" Inherits="ZHCX_ZHTJ" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v12.1.Export, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v12.1" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v12.1" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>综合统计</title>
    <style type="text/css">
        body
        {
            color: #000;
            background-color: #EEF2FB;
            margin: 0px;
            font-family: "宋体";
            font-size: 12px;
        }
    </style>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF2FB">
        <%-- <tr>
      <td width="17" valign="top" background="../images/mail_leftbg.gif">
        <img src="../images/left-top-right.gif" width="17" height="29" />
      </td>
      <td valign="top" background="../images/content-bg.gif">
        <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg"
          id="table2">
          <tr>
            <td height="31">
              <div class="titlebt">
                综合统计</div>
            </td>
          </tr>
        </table>
      </td>
      <td width="16" valign="top" background="../images/mail_rightbg.gif">
        <img src="../images/nav-right-bg.gif" width="16" height="29" />
      </td>
    </tr>--%>
        <tr>
            <%-- <td valign="middle" background="../images/mail_leftbg.gif">
        &nbsp;
      </td>--%>
            <td valign="top" bgcolor="#F7F8F9">
                <div style="width: 98%; height: 30px; margin-top: 5px;">
                    <table width="100%">
                        <tr>
                            <td align="left" width="100%">
                                <table>
                                    <tr>
                                        <%-- <td>
                      <asp:Label ID="Label1" runat="server" Text="客户编码"></asp:Label>
                      <asp:TextBox ID="txtKHBM" runat="server" Width="60px"></asp:TextBox>
                      <asp:Label ID="Label5" runat="server" Text="客户名称"></asp:Label>
                      <asp:TextBox ID="txtKHMC" runat="server" Width="100px"></asp:TextBox>
                      <asp:Label ID="Label2" runat="server" Text="标识"></asp:Label>
                      <asp:TextBox ID="txtBS" runat="server" Width="70px"></asp:TextBox>
                    </td>--%>
                                        <td>
                                            <dxe:ASPxDateEdit ID="date1" runat="server" Width="90px">
                                            </dxe:ASPxDateEdit>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="date1"
                                                ErrorMessage="*"></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            <dxe:ASPxDateEdit ID="date2" runat="server" Width="90px">
                                            </dxe:ASPxDateEdit>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="date2"
                                                ErrorMessage="*"></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
                                            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="ASPxGridView1">
                                            </dx:ASPxGridViewExporter>
                                            <asp:Button ID="Button1" runat="server" Text="导出excel" OnClick="btnExport_Click" />
                                        </td>
                                        <%--<td>
                      <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="客户编码必须为数字"
                        ControlToValidate="txtKHBM" MaximumValue="1000000000" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                    </td>--%>
                                    </tr>
                                </table>
                                <%--
                <asp:DropDownList ID="ddlNF" runat="server">
                </asp:DropDownList>
                <asp:DropDownList ID="ddlYF" runat="server">
                  <asp:ListItem Value="01">01</asp:ListItem>
                  <asp:ListItem Value="02">02</asp:ListItem>
                  <asp:ListItem Value="03">03</asp:ListItem>
                  <asp:ListItem Value="04">04</asp:ListItem>
                  <asp:ListItem Value="05">05</asp:ListItem>
                  <asp:ListItem Value="06">06</asp:ListItem>
                  <asp:ListItem Value="07">07</asp:ListItem>
                  <asp:ListItem Value="08">08</asp:ListItem>
                  <asp:ListItem Value="09">09</asp:ListItem>
                  <asp:ListItem Value="10">10</asp:ListItem>
                  <asp:ListItem Value="11">11</asp:ListItem>
                  <asp:ListItem Value="12">12</asp:ListItem>
                </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtRQ"
                  ErrorMessage="日期不能为空"></asp:RequiredFieldValidator>--%>
                            </td>
                            <%-- <td align="right" width="30%">
              </td>--%>
                        </tr>
                    </table>
                </div>
                <div style="width: 98%;">
                    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="xh"
                        Width="100%" Theme="Aqua">
                        <SettingsBehavior AllowFocusedRow="True" AutoFilterRowInputDelay="-1" />
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="序号" FieldName="xh" VisibleIndex="0" Width="50px"
                                FixedStyle="Left">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="客户编码" FieldName="CX_KHBM" VisibleIndex="1" FixedStyle="Left"
                                Width="70px">
                                <Settings AutoFilterCondition="Equals" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="客户名称" FieldName="CX_KHMC" VisibleIndex="1" FixedStyle="Left"
                                Width="200px">
                                <Settings AutoFilterCondition="Contains" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="标识" FieldName="CX_BS" VisibleIndex="1" FixedStyle="Left"
                                Width="100px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="IC卡户" FieldName="CX_IC" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="管理单位" FieldName="CX_GLDW" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="客户级别" FieldName="CX_KHJB" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="应收气量" FieldName="CX_YSQL" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("cx_ysql").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("cx_ysql"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="应收气费(元)" FieldName="CX_SR" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_SR").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_SR"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="应收价格基金(元)" FieldName="CX_JGJJ" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_JGJJ").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_JGJJ"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="应收合计(元)" FieldName="CX_BC" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_BC").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_BC"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="本期实缴(元)" FieldName="CX_BQSJ" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_BQSJ").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_BQSJ"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <%-- <dx:GridViewDataTextColumn Caption="实收气量(m<sup>3</sup>)" FieldName="CX_SSQL" VisibleIndex="1"
                Width="80px">
                <DataItemTemplate>
                  <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_SSQL").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_SSQL"))) %>'></asp:Label>
                </DataItemTemplate>
              </dx:GridViewDataTextColumn>--%>
                           <%-- <dx:GridViewDataTextColumn Caption="实收气费(元)" FieldName="CX_SJSR" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_SJSR").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_SJSR"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="实收价格基金(元)" FieldName="CX_SJJGJJ" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_SJJGJJ").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_SJJGJJ"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="实收合计(元)" FieldName="CX_XJ" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_XJ").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_XJ"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>--%>
                            <dx:GridViewDataTextColumn Caption="上期结余(元)" FieldName="CX_SQJY" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_SQJY").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_SQJY"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="本期结余(元)" FieldName="CX_BQJY" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("CX_BQJY").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("CX_BQJY"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="累计欠费金额(元)" FieldName="JELJCY" VisibleIndex="1">
                                <DataItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("JELJCY").ToString()==""?"":string.Format("{0:n}", Convert.ToDecimal(Eval("JELJCY"))) %>'></asp:Label>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Settings ShowHorizontalScrollBar="True" UseFixedTableLayout="True" ShowFooter="true"
                            ShowFilterRowMenu="true" ShowFilterRow="true" />
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                        </StylesEditors>
                        <TotalSummary>
                            <dx:ASPxSummaryItem FieldName="xh" SummaryType="Count" DisplayFormat="合计" />
                            <dx:ASPxSummaryItem FieldName="CX_KHMC" SummaryType="Count" DisplayFormat="客户数量:{0}" />
                            <dx:ASPxSummaryItem FieldName="CX_YSQL" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SR" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_JGJJ" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_BC" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_BQSJ" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SSQL" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SJSR" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SJJGJJ" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_XJ" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SQJY" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_BQJY" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="CX_SLLJCY" SummaryType="Sum" DisplayFormat="{0:n}" />
                            <dx:ASPxSummaryItem FieldName="JELJCY" SummaryType="Sum" DisplayFormat="{0:n}" />
                        </TotalSummary>
                    </dx:ASPxGridView>
                </div>
            </td>
            <%--  <td background="../images/mail_rightbg.gif">
        &nbsp;
      </td>--%>
        </tr>
        <%-- <tr>
      <td valign="bottom" background="../images/mail_leftbg.gif">
        <img src="../images/buttom_left2.gif" width="17" height="17" />
      </td>
      <td background="../images/buttom_bgs.gif">
        <img src="../images/buttom_bgs.gif" width="17" height="17">
      </td>
      <td valign="bottom" background="../images/mail_rightbg.gif">
        <img src="../images/buttom_right2.gif" width="16" height="17" />
      </td>
    </tr>--%>
    </table>
    </form>
</body>
</html>
